package com.sufen.seckill.study.FaceCoding;

/**
 * @Author sufen
 * @Date 2021/11/1 16:36
 * @Version 1.0
 * 功能描述：双检索单例
 */

public class c1_Singleton {
    private static volatile c1_Singleton singleton;
    private c1_Singleton(){

    }
    public c1_Singleton getSingleton(){
        if(singleton==null){
            synchronized (c1_Singleton.class){
                if(singleton==null){
                    singleton=new c1_Singleton();
                }
            }
        }
        return singleton;
        //test gitee
    }
}
